Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix heredoc comma issue #65

Merged

Conversation

gingermusketeer
Copy link
Member

Fixes #61.

Why: when trailing commas are wanted we put them into the wrong place for heredocs.
Why: So that trailing comma config is respected.
Copy link
Member

@splattael splattael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you! 💚

I have left one comment, though 😃

# This is needed so that we can add a comma if one is not already present.
captured_output = capture_output { next_token }

inside_literal_elements_list = !@literal_elements_level.nil? &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we initialize @literal_elements_level in the initialize method similar to @node_level?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. I have fixed this up.

@splattael splattael requested a review from mjago November 20, 2017 07:17
@gingermusketeer
Copy link
Member Author

Any other thoughts on this one?

Copy link
Member

@splattael splattael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you 💚

@gingermusketeer gingermusketeer merged commit b2840ff into ruby-formatter:master Nov 23, 2017
@gingermusketeer gingermusketeer deleted the bug/heredoc-comma-issue branch November 23, 2017 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants